Merged
Conversation
* feat: MissionQueryRepository, MissionQueryRepositoryAdapter에 existsByStampIdAndCompletedIsFalseAndDeletedAtIsNull 메서드 추가 * feat: MissionErrorCode에 ALL_MISSIONS_NOT_COMPLETED 에러코드 추가 * feat: MissionPolicy에 validateAllCompleted 메서드 추가 * feat: MissionService에 validateAllMissionsCompletedByStampId 메서드 추가 * feat: StampQueryRepository, StampQueryRepositoryAdapter에 existsByTripIdAndCompletedIsFalseAndDeletedAtIsNull 메서드 추가 * feat: StampErrorCode에 STAMP_ALREADY_COMPLETED 에러코드 추가 * feat: StampErrorCode에 ALL_STAMPS_NOT_COMPLETED 에러코드 추 * feat: StampPolicy에 validateCompleted, validateAllCompleted 메서드 추가 * feat: StampService에 completeStamp, validateAllStampsCompletedByTripId 메서드 추가 * feat: Trip에 increaseCompletedStamps 메서드 추가 * feat: TripErrorCode에 TRIP_ALREADY_COMPLETED 에러코드 추가 * feat: TripPolicy에 validateCompleted 메서드 추가 * feat: TripService에 completeTrip 메서드 추가 * feat: StampFacade에 completeStamp 메서드 추가 * feat: TripFacade에 completeTrip 메서드 추가 * feat: StampController에 스탬프 완료 API 추가 * feat: TripController에 여행 완료 API 추가 * refactor: MissionService에서 updateCompleted -> completeMission 이름 변경 * refactor: MissionService.completeMission()에 @transactional 어노테이션 추가 * refactor: StampQueryRepositoryAdapter를 infra.querydsl 패키지로 이동 * refactor: Trip.updateCompleted() 비즈니스 로직 개선 * test: MissionServiceTest에 CompleteMission, ValidateAllMissionsCompletedByStampId 단위 테스트 추가 * test: StampServiceTest에 CompleteStamp, ValidateAllStampsCompletedByTripId 단위 테스트 추가 * test: TripServiceTest에 CompleteTrip 단위 테스트 추가 * test: StampControllerIntegrationTest에 CompleteStamp 통합 테스트 추가 * test: TripControllerIntegrationTest에 CompleteTrip 통합 테스트 추가 * test: MissionControllerIntegrationTest에서 특정 여행,스탬프,미션 삭제 시, updateDeletedAt() 호출로 변경
hisonghy
reviewed
Aug 13, 2025
src/main/java/com/ject/studytrip/stamp/application/service/StampService.java
Outdated
Show resolved
Hide resolved
src/main/java/com/ject/studytrip/stamp/presentation/controller/StampController.java
Show resolved
Hide resolved
...ava/com/ject/studytrip/mission/presentation/controller/MissionControllerIntegrationTest.java
Show resolved
Hide resolved
* refactor: StampFacade.completeStamp() 비즈니스 로직 개선 * refactor: StampService.completeStamp() 비즈니스 로직 개 * test: TripServiceTest에 IncreaseCompletedStamps 단위 테스트 추가 * refactor: StampService에 completeStamp 메서드 비즈니스 로직 개선
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 작업 내용 및 특이사항
✅ 스탬프 완료 API
MissionService.validateAllMissionsCompletedByStampId()를 통해, 특정 스탬프 하위의 모든 미션이 완료되었는지 검증StampPolicy.validateCompleted()를 통해, 특정 스탬프가 이미 완료되었는지 검증StampService.completeStamp()를 통해, 특정 스탬프를 완료 처리한 후,Trip의completedStamps필드 1 증가✅ 여행 완료 API
StampService.validateAllStampsCompletedByTripId()를 통해, 특정 여행 하위의 모든 스탬프가 완료되었는지 검증TripPolicy.validateCompleted()를 통해, 특정 여행이 이미 완료되었는지 검증TripService.completeTrip()를 통해, 특정 여행을 완료 처리✅ 도메인 메서드 추가
Trip.increaseCompletedStamps()메서드 추가✅ 리포지토리 메서드 추가
MissionQueryRepository.existsByStampIdAndCompletedIsFalseAndDeletedAtIsNull()메서드 추가StampQueryRepository.existsByTripIdAndCompletedIsFalseAndDeletedAtIsNull()메서드 추가✅ 서비스 메서드 추가
MissionService.validateAllMissionsCompletedByStampId()메서드 추가StampService.completeStamp(),StampService.validateAllStampsCompletedByTripId()메서드 추가TripService.completeTrip()메서드 추가TripService.increaseCompletedStamps()메서드 추가✅ 테스트
MissionServiceTest에ValidateAllMissionsCompletedByStampId단위 테스트 추가StampServiceTest에CompleteStamp,ValidateAllStampsCompletedByTripId단위 테스트 추가TripServiceTest에CompleteTrip,IncreaseCompletedStamps단위 테스트 추가StampControllerIntegrationTest에CompleteStamp통합 테스트 추가TripControllerIntegrationTest에CompleteTrip통합 테스트 추가MissionControllerIntegrationTest에서 특정 여행,스탬프,미션 삭제 시,도메인.updateDeletedAt()호출로 변경🌱 관련 이슈
🔍 참고사항(선택)
MissionService에서 updateCompleted -> completeMission 이름 변경MissionService.completeMission()에@Transactional어노테이션 추가StampQueryRepositoryAdapter를infra.querydsl패키지로 이동Trip.updateCompleted()비즈니스 로직 개선📚 기타(선택)
MissionControllerIntegrationTest에서 기존에는missionTestHelper.saveDeletedMission,stampTestHelper.saveDeletedStamp,tripTestHelper.saveDeletedTrip을 호출해 삭제 상태 데이터를 새로 생성했습니다.updateDeletedAt()을 직접 호출하면, 바로 삭제 상태를 만들 수 있습니다.